<template>
	<Calculator :operation="'divide'" @calculated="handleCalculation"></Calculator>

	<span class="result">结果：{{ result }}</span>

</template>

<script>
import Calculator from '../../src/components/Calculator.vue'
export default {
	components: {
		Calculator
	},
	data() {
		return {
			result: 0
		}
	},
	methods: {
		handleCalculation(value) {
			this.result = value
		}
	}
}
</script>

<style>
.result {
	margin-top: 20px;
	font-size: 18px;
	color: #333;
}
</style>
